package pos.domain;

import java.util.*;
import pos.data.*;

public class CalleProcesator implements ICalleProcesator{
	
	private List<String> listaCalles;
	private JDBCCalleDAO calleDao;

	@Override
	public List<String> getData(String query) {
		query = query.toLowerCase();
		List<Calle> lista = new ArrayList<Calle>();
		lista = calleDao.selectListByNombre(query);
		for(Calle c:lista){
			listaCalles.add(c.getNombre());
		}
		return listaCalles;
	}

	public CalleProcesator() {
		listaCalles = new ArrayList<String>();
		calleDao = new JDBCCalleDAO();
	}
	
	

}
